3.1.24 \(\int \frac {A+B x}{(a+c x^2) \sqrt {d+f x^2}} \, dx\) [24]

3.1.24.1 Optimal result
3.1.24.2 Mathematica [B] (verified)
3.1.24.3 Rubi [A] (verified)
3.1.24.4 Maple [B] (verified)
3.1.24.5 Fricas [B] (verification not implemented)
3.1.24.6 Sympy [F]
3.1.24.7 Maxima [F]
3.1.24.8 Giac [F(-1)]
3.1.24.9 Mupad [F(-1)]

3.1.24.1 Optimal result

Integrand size = 26, antiderivative size = 101 \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+f x^2}} \, dx=\frac {A \arctan \left (\frac {\sqrt {c d-a f} x}{\sqrt {a} \sqrt {d+f x^2}}\right )}{\sqrt {a} \sqrt {c d-a f}}-\frac {B \text {arctanh}\left (\frac {\sqrt {c} \sqrt {d+f x^2}}{\sqrt {c d-a f}}\right )}{\sqrt {c} \sqrt {c d-a f}} \]

output
A*arctan(x*(-a*f+c*d)^(1/2)/a^(1/2)/(f*x^2+d)^(1/2))/a^(1/2)/(-a*f+c*d)^(1 
/2)-B*arctanh(c^(1/2)*(f*x^2+d)^(1/2)/(-a*f+c*d)^(1/2))/c^(1/2)/(-a*f+c*d) 
^(1/2)
 
3.1.24.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(349\) vs. \(2(101)=202\).

Time = 1.45 (sec) , antiderivative size = 349, normalized size of antiderivative = 3.46 \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+f x^2}} \, dx=\frac {\sqrt {a} B \left (\left (\sqrt {a} \sqrt {f}+\sqrt {-c d+a f}\right ) \sqrt {-c d+2 a f-2 \sqrt {a} \sqrt {f} \sqrt {-c d+a f}} \arctan \left (\frac {\sqrt {c} \left (\sqrt {f} x-\sqrt {d+f x^2}\right )}{\sqrt {-c d+2 a f-2 \sqrt {a} \sqrt {f} \sqrt {-c d+a f}}}\right )+\left (-\sqrt {a} \sqrt {f}+\sqrt {-c d+a f}\right ) \sqrt {-c d+2 a f+2 \sqrt {a} \sqrt {f} \sqrt {-c d+a f}} \arctan \left (\frac {\sqrt {c} \left (\sqrt {f} x-\sqrt {d+f x^2}\right )}{\sqrt {-c d+2 a f+2 \sqrt {a} \sqrt {f} \sqrt {-c d+a f}}}\right )\right )+A c^{3/2} d \text {arctanh}\left (\frac {a \sqrt {f}+c x \left (\sqrt {f} x-\sqrt {d+f x^2}\right )}{\sqrt {a} \sqrt {-c d+a f}}\right )}{\sqrt {a} c^{3/2} d \sqrt {-c d+a f}} \]

input
Integrate[(A + B*x)/((a + c*x^2)*Sqrt[d + f*x^2]),x]
 
output
(Sqrt[a]*B*((Sqrt[a]*Sqrt[f] + Sqrt[-(c*d) + a*f])*Sqrt[-(c*d) + 2*a*f - 2 
*Sqrt[a]*Sqrt[f]*Sqrt[-(c*d) + a*f]]*ArcTan[(Sqrt[c]*(Sqrt[f]*x - Sqrt[d + 
 f*x^2]))/Sqrt[-(c*d) + 2*a*f - 2*Sqrt[a]*Sqrt[f]*Sqrt[-(c*d) + a*f]]] + ( 
-(Sqrt[a]*Sqrt[f]) + Sqrt[-(c*d) + a*f])*Sqrt[-(c*d) + 2*a*f + 2*Sqrt[a]*S 
qrt[f]*Sqrt[-(c*d) + a*f]]*ArcTan[(Sqrt[c]*(Sqrt[f]*x - Sqrt[d + f*x^2]))/ 
Sqrt[-(c*d) + 2*a*f + 2*Sqrt[a]*Sqrt[f]*Sqrt[-(c*d) + a*f]]]) + A*c^(3/2)* 
d*ArcTanh[(a*Sqrt[f] + c*x*(Sqrt[f]*x - Sqrt[d + f*x^2]))/(Sqrt[a]*Sqrt[-( 
c*d) + a*f])])/(Sqrt[a]*c^(3/2)*d*Sqrt[-(c*d) + a*f])
 
3.1.24.3 Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {1343, 291, 218, 353, 73, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+f x^2}} \, dx\)

\(\Big \downarrow \) 1343

\(\displaystyle A \int \frac {1}{\left (c x^2+a\right ) \sqrt {f x^2+d}}dx+B \int \frac {x}{\left (c x^2+a\right ) \sqrt {f x^2+d}}dx\)

\(\Big \downarrow \) 291

\(\displaystyle A \int \frac {1}{a-\frac {(a f-c d) x^2}{f x^2+d}}d\frac {x}{\sqrt {f x^2+d}}+B \int \frac {x}{\left (c x^2+a\right ) \sqrt {f x^2+d}}dx\)

\(\Big \downarrow \) 218

\(\displaystyle B \int \frac {x}{\left (c x^2+a\right ) \sqrt {f x^2+d}}dx+\frac {A \arctan \left (\frac {x \sqrt {c d-a f}}{\sqrt {a} \sqrt {d+f x^2}}\right )}{\sqrt {a} \sqrt {c d-a f}}\)

\(\Big \downarrow \) 353

\(\displaystyle \frac {1}{2} B \int \frac {1}{\left (c x^2+a\right ) \sqrt {f x^2+d}}dx^2+\frac {A \arctan \left (\frac {x \sqrt {c d-a f}}{\sqrt {a} \sqrt {d+f x^2}}\right )}{\sqrt {a} \sqrt {c d-a f}}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {B \int \frac {1}{\frac {c x^4}{f}+a-\frac {c d}{f}}d\sqrt {f x^2+d}}{f}+\frac {A \arctan \left (\frac {x \sqrt {c d-a f}}{\sqrt {a} \sqrt {d+f x^2}}\right )}{\sqrt {a} \sqrt {c d-a f}}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {A \arctan \left (\frac {x \sqrt {c d-a f}}{\sqrt {a} \sqrt {d+f x^2}}\right )}{\sqrt {a} \sqrt {c d-a f}}-\frac {B \text {arctanh}\left (\frac {\sqrt {c} \sqrt {d+f x^2}}{\sqrt {c d-a f}}\right )}{\sqrt {c} \sqrt {c d-a f}}\)

input
Int[(A + B*x)/((a + c*x^2)*Sqrt[d + f*x^2]),x]
 
output
(A*ArcTan[(Sqrt[c*d - a*f]*x)/(Sqrt[a]*Sqrt[d + f*x^2])])/(Sqrt[a]*Sqrt[c* 
d - a*f]) - (B*ArcTanh[(Sqrt[c]*Sqrt[d + f*x^2])/Sqrt[c*d - a*f]])/(Sqrt[c 
]*Sqrt[c*d - a*f])
 

3.1.24.3.1 Defintions of rubi rules used

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

rule 353
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] 
 :> Simp[1/2   Subst[Int[(a + b*x)^p*(c + d*x)^q, x], x, x^2], x] /; FreeQ[ 
{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0]
 

rule 1343
Int[((g_) + (h_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_)*((d_) + (f_.)*(x_)^2)^(q 
_), x_Symbol] :> Simp[g   Int[(a + c*x^2)^p*(d + f*x^2)^q, x], x] + Simp[h 
  Int[x*(a + c*x^2)^p*(d + f*x^2)^q, x], x] /; FreeQ[{a, c, d, f, g, h, p, 
q}, x]
 
3.1.24.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(336\) vs. \(2(81)=162\).

Time = 0.58 (sec) , antiderivative size = 337, normalized size of antiderivative = 3.34

method result size
default \(-\frac {\left (-A c +B \sqrt {-a c}\right ) \ln \left (\frac {-\frac {2 \left (f a -c d \right )}{c}-\frac {2 f \sqrt {-a c}\, \left (x +\frac {\sqrt {-a c}}{c}\right )}{c}+2 \sqrt {-\frac {f a -c d}{c}}\, \sqrt {f \left (x +\frac {\sqrt {-a c}}{c}\right )^{2}-\frac {2 f \sqrt {-a c}\, \left (x +\frac {\sqrt {-a c}}{c}\right )}{c}-\frac {f a -c d}{c}}}{x +\frac {\sqrt {-a c}}{c}}\right )}{2 \sqrt {-a c}\, c \sqrt {-\frac {f a -c d}{c}}}-\frac {\left (A c +B \sqrt {-a c}\right ) \ln \left (\frac {-\frac {2 \left (f a -c d \right )}{c}+\frac {2 f \sqrt {-a c}\, \left (x -\frac {\sqrt {-a c}}{c}\right )}{c}+2 \sqrt {-\frac {f a -c d}{c}}\, \sqrt {f \left (x -\frac {\sqrt {-a c}}{c}\right )^{2}+\frac {2 f \sqrt {-a c}\, \left (x -\frac {\sqrt {-a c}}{c}\right )}{c}-\frac {f a -c d}{c}}}{x -\frac {\sqrt {-a c}}{c}}\right )}{2 \sqrt {-a c}\, c \sqrt {-\frac {f a -c d}{c}}}\) \(337\)

input
int((B*x+A)/(c*x^2+a)/(f*x^2+d)^(1/2),x,method=_RETURNVERBOSE)
 
output
-1/2*(-A*c+B*(-a*c)^(1/2))/(-a*c)^(1/2)/c/(-(a*f-c*d)/c)^(1/2)*ln((-2*(a*f 
-c*d)/c-2*f*(-a*c)^(1/2)/c*(x+(-a*c)^(1/2)/c)+2*(-(a*f-c*d)/c)^(1/2)*(f*(x 
+(-a*c)^(1/2)/c)^2-2*f*(-a*c)^(1/2)/c*(x+(-a*c)^(1/2)/c)-(a*f-c*d)/c)^(1/2 
))/(x+(-a*c)^(1/2)/c))-1/2*(A*c+B*(-a*c)^(1/2))/(-a*c)^(1/2)/c/(-(a*f-c*d) 
/c)^(1/2)*ln((-2*(a*f-c*d)/c+2*f*(-a*c)^(1/2)/c*(x-(-a*c)^(1/2)/c)+2*(-(a* 
f-c*d)/c)^(1/2)*(f*(x-(-a*c)^(1/2)/c)^2+2*f*(-a*c)^(1/2)/c*(x-(-a*c)^(1/2) 
/c)-(a*f-c*d)/c)^(1/2))/(x-(-a*c)^(1/2)/c))
 
3.1.24.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1515 vs. \(2 (81) = 162\).

Time = 0.37 (sec) , antiderivative size = 1515, normalized size of antiderivative = 15.00 \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+f x^2}} \, dx=\text {Too large to display} \]

input
integrate((B*x+A)/(c*x^2+a)/(f*x^2+d)^(1/2),x, algorithm="fricas")
 
output
-1/4*sqrt((B^2*a - A^2*c + 2*(a*c^2*d - a^2*c*f)*sqrt(-A^2*B^2/(a*c^3*d^2 
- 2*a^2*c^2*d*f + a^3*c*f^2)))/(a*c^2*d - a^2*c*f))*log(((A*B^3*a + A^3*B* 
c)*f*x + (A^2*B*c^2*d - A^2*B*a*c*f + (B*a*c^3*d^2 - 2*B*a^2*c^2*d*f + B*a 
^3*c*f^2)*sqrt(-A^2*B^2/(a*c^3*d^2 - 2*a^2*c^2*d*f + a^3*c*f^2)))*sqrt(f*x 
^2 + d)*sqrt((B^2*a - A^2*c + 2*(a*c^2*d - a^2*c*f)*sqrt(-A^2*B^2/(a*c^3*d 
^2 - 2*a^2*c^2*d*f + a^3*c*f^2)))/(a*c^2*d - a^2*c*f)) + sqrt(-A^2*B^2/(a* 
c^3*d^2 - 2*a^2*c^2*d*f + a^3*c*f^2))*((B^2*a*c^2 + A^2*c^3)*d^2 - (B^2*a^ 
2*c + A^2*a*c^2)*d*f))/x) + 1/4*sqrt((B^2*a - A^2*c + 2*(a*c^2*d - a^2*c*f 
)*sqrt(-A^2*B^2/(a*c^3*d^2 - 2*a^2*c^2*d*f + a^3*c*f^2)))/(a*c^2*d - a^2*c 
*f))*log(((A*B^3*a + A^3*B*c)*f*x - (A^2*B*c^2*d - A^2*B*a*c*f + (B*a*c^3* 
d^2 - 2*B*a^2*c^2*d*f + B*a^3*c*f^2)*sqrt(-A^2*B^2/(a*c^3*d^2 - 2*a^2*c^2* 
d*f + a^3*c*f^2)))*sqrt(f*x^2 + d)*sqrt((B^2*a - A^2*c + 2*(a*c^2*d - a^2* 
c*f)*sqrt(-A^2*B^2/(a*c^3*d^2 - 2*a^2*c^2*d*f + a^3*c*f^2)))/(a*c^2*d - a^ 
2*c*f)) + sqrt(-A^2*B^2/(a*c^3*d^2 - 2*a^2*c^2*d*f + a^3*c*f^2))*((B^2*a*c 
^2 + A^2*c^3)*d^2 - (B^2*a^2*c + A^2*a*c^2)*d*f))/x) - 1/4*sqrt((B^2*a - A 
^2*c - 2*(a*c^2*d - a^2*c*f)*sqrt(-A^2*B^2/(a*c^3*d^2 - 2*a^2*c^2*d*f + a^ 
3*c*f^2)))/(a*c^2*d - a^2*c*f))*log(((A*B^3*a + A^3*B*c)*f*x + (A^2*B*c^2* 
d - A^2*B*a*c*f - (B*a*c^3*d^2 - 2*B*a^2*c^2*d*f + B*a^3*c*f^2)*sqrt(-A^2* 
B^2/(a*c^3*d^2 - 2*a^2*c^2*d*f + a^3*c*f^2)))*sqrt(f*x^2 + d)*sqrt((B^2*a 
- A^2*c - 2*(a*c^2*d - a^2*c*f)*sqrt(-A^2*B^2/(a*c^3*d^2 - 2*a^2*c^2*d*...
 
3.1.24.6 Sympy [F]

\[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+f x^2}} \, dx=\int \frac {A + B x}{\left (a + c x^{2}\right ) \sqrt {d + f x^{2}}}\, dx \]

input
integrate((B*x+A)/(c*x**2+a)/(f*x**2+d)**(1/2),x)
 
output
Integral((A + B*x)/((a + c*x**2)*sqrt(d + f*x**2)), x)
 
3.1.24.7 Maxima [F]

\[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+f x^2}} \, dx=\int { \frac {B x + A}{{\left (c x^{2} + a\right )} \sqrt {f x^{2} + d}} \,d x } \]

input
integrate((B*x+A)/(c*x^2+a)/(f*x^2+d)^(1/2),x, algorithm="maxima")
 
output
integrate((B*x + A)/((c*x^2 + a)*sqrt(f*x^2 + d)), x)
 
3.1.24.8 Giac [F(-1)]

Timed out. \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+f x^2}} \, dx=\text {Timed out} \]

input
integrate((B*x+A)/(c*x^2+a)/(f*x^2+d)^(1/2),x, algorithm="giac")
 
output
Timed out
 
3.1.24.9 Mupad [F(-1)]

Timed out. \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+f x^2}} \, dx=\left \{\begin {array}{cl} \frac {B\,\mathrm {atan}\left (\frac {c\,\sqrt {f\,x^2+d}}{\sqrt {a\,c\,f-c^2\,d}}\right )}{\sqrt {a\,c\,f-c^2\,d}}+\frac {A\,\mathrm {atan}\left (\frac {x\,\sqrt {c\,d-a\,f}}{\sqrt {a}\,\sqrt {f\,x^2+d}}\right )}{\sqrt {-a\,\left (a\,f-c\,d\right )}} & \text {\ if\ \ }0<c\,d-a\,f\\ \frac {A\,\ln \left (\frac {\sqrt {a\,\left (f\,x^2+d\right )}+x\,\sqrt {a\,f-c\,d}}{\sqrt {a\,\left (f\,x^2+d\right )}-x\,\sqrt {a\,f-c\,d}}\right )}{2\,\sqrt {a\,\left (a\,f-c\,d\right )}}+\frac {B\,\mathrm {atan}\left (\frac {c\,\sqrt {f\,x^2+d}}{\sqrt {a\,c\,f-c^2\,d}}\right )}{\sqrt {a\,c\,f-c^2\,d}} & \text {\ if\ \ }c\,d-a\,f<0\\ \int \frac {A+B\,x}{\left (c\,x^2+a\right )\,\sqrt {f\,x^2+d}} \,d x & \text {\ if\ \ }c\,d-a\,f\notin \mathbb {R}\vee a\,f=c\,d \end {array}\right . \]

input
int((A + B*x)/((a + c*x^2)*(d + f*x^2)^(1/2)),x)
 
output
piecewise(0 < - a*f + c*d, (B*atan((c*(d + f*x^2)^(1/2))/(- c^2*d + a*c*f) 
^(1/2)))/(- c^2*d + a*c*f)^(1/2) + (A*atan((x*(- a*f + c*d)^(1/2))/(a^(1/2 
)*(d + f*x^2)^(1/2))))/(-a*(a*f - c*d))^(1/2), - a*f + c*d < 0, (A*log(((a 
*(d + f*x^2))^(1/2) + x*(a*f - c*d)^(1/2))/((a*(d + f*x^2))^(1/2) - x*(a*f 
 - c*d)^(1/2))))/(2*(a*(a*f - c*d))^(1/2)) + (B*atan((c*(d + f*x^2)^(1/2)) 
/(- c^2*d + a*c*f)^(1/2)))/(- c^2*d + a*c*f)^(1/2), ~in(- a*f + c*d, 'real 
') | a*f == c*d, int((A + B*x)/((a + c*x^2)*(d + f*x^2)^(1/2)), x))